﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using DC2010.Objects.Common;

namespace DC2010_EditorInfo
{
    public partial class KeyValueForm : Form
    {
        public KeyValueForm(List<KeyValue> data)
        {
            InitializeComponent();

            keyValueUC1.Data = data;
        }

        private void crystalButton1_Click(object sender, EventArgs e)
        {
            foreach (KeyValue keyValue in keyValueUC1.Data)
            {
                if ((string.IsNullOrEmpty(keyValue.Key)) || (string.IsNullOrEmpty(keyValue.Value)))
                    BackColor = Color.FromArgb(255, 255, 122, 122);
                else
                {
                    BackColor = SystemColors.Control;
                }
            }
        }

        private void crystalButton2_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
